{% extends "../base.html" %}
{% block page_title %}金币购买记录{% end %}
{% block content %}
<div class="countgo pull-left">
    <div class="zt">
        <!--MAN -->
        <div class="remain" style="height: 553px;">
            <div class="gao1"></div>
            <div class="page-header long-header">
                <h3>交易系统
                    <small> 金币购买记录</small>
                </h3>
            </div>
            <div>
                <ol class="breadcrumb">
                    <li><span class="glyphicon glyphicon-home" aria-hidden="true"></span> <a href="index.asp">主页</a>
                    </li>
                    <li><a href="#">交易系统</a></li>
                    <li class="active">金币购买记录</li>
                </ol>
            </div>


            <div class="panel panel-default">
                <div class="panel-heading">金币购买列表</div>

                <div class="panel-body">
                    <strong><span style="color:#F00;">警告:</span></strong><br>
                    <span style="color:#F00; font-weight:bold;">1.请立即向对方支付宝打款,30分钟内未付款 则视为恶意交易,系统会扣除您的违约金 具体为: 主动放弃交易扣除2金币  超过30分钟超时 扣除20金币,没有打款而点确认付款的扣除3倍本次交易总额金币</span><br>
                    <span style="color:#F00;">2.向对方支付宝账号打款成功后,请把点击后面的'<strong>我已付款</strong>'按钮 确认付款,等待卖家确认,这时候您可以主动通过微信或者电话联系卖家确认收款</span><br>
                    <span style="color:#F00;">3.如果付款完成,卖家长时间不确认收货,请联系公司出面解决,届时会对卖家做相应惩罚,并给予您补偿</span><br>
                </div>

                <table class="table table-striped table-hover">
                    <tbody>
                    <tr>
                        <td>单号ID</td>
                        <td>卖家编号</td>
                        <td>卖家支付宝信息</td>
                        <td>挂单金额</td>
                        <td>抢购时间</td>
                        <td>操作</td>
                    </tr>
                    {%if record.count()==0%}
                    <tr>
                        <td colspan="6">暂无记录</td>
                    </tr>
                    {%else%}
                    {%for r in record%}
                    <tr>
                        <td>{{r.get('id')}}</td>
                        <td>{{r.get('uid')}}</td>
                        <td>{{alipay_info(r.get('uid')).get('name')}} {{alipay_info(r.get('uid')).get('account')}}</td>
                        <td>{{r.get('money')}}</td>
                        <td>{{r.get('pay_time')}}</td>
                        <td>
                            {%if r.get('status')=='confirm'%}
                            <a href="/trade/jinbi_confirm_pay?id={{r.get('id')}}">我已付款</a>
                            <a href="javascript:;" data-id="{{r.get('id')}}" class="cancel_trade">放弃交易</a>
                            {%elif r.get('status')=='paid'%}
                            已付款,等待收款<a href="/static/media/pay_image/{{r.get('pay_image')}}" target="_blank">[查看]</a>
                            {%end%}
                        </td>
                    </tr>
                    {%end%}
                    {%end%}
                    </tbody>
                </table>


            </div>
        </div>
        <!--MAN End-->
    </div>
</div>
<script type="text/javascript">
    $(".cancel_trade").click(function(){
        var id=$(this).data("id");
        if (confirm("主动放弃交易将扣除2金币")){
            location.href="/trade/jinbi_cancel_pay?id="+id;
        }
    })
</script>
{%end%}
